Finding a longest common subsequence between a run-length-encoded string and an uncompressed string
نویسندگان
چکیده
In this paper, we propose anO(min{mN,Mn}) time algorithm for finding a longest common subsequence of stringsX and Y with lengthsM andN , respectively, and run-length-encoded lengthsm and n, respectively. We propose a new recursive formula for finding a longest common subsequence of Y and X which is in the run-length-encoded format. That is, Y=y1y2 · · · yN andX=r1 1 r2 2 · · · rm m , where ri is the repeated character of run i and li is the number of its repetitions. There are three cases in the proposed recursive formula in which two cases are for ri matching yj . The third case is for ri mismatching yj . We will look specifically at the prior two cases that ri matches yj . To determine which case will be used when ri matches yj , we have to find a specific value which can be obtained by using another of our proposed recursive formulas. © 2007 Elsevier Inc. All rights reserved.
منابع مشابه
Matching for Run-Length Encoded Strings
1 Motivation Measuring the similarity between two strings, through such standard measures as Hamming distance, edit distance, and longest common subsequence, is one of the fundamental problems in pattern matching. We consider the problem of nding the longest common subsequence of two strings. A well-known dynamic programming algorithm computes the longest common subsequence of strings X and Y i...
متن کاملLongest common subsequence between run-length-encoded strings: a new algorithm with improved parallelism
Data compression can be used to simultaneously reduce memory, communication and computation requirements of string comparison. In this paper we address the problem of computing the length of the longest common subsequence (LCS) between run-length-encoded (RLE) strings. We exploit RLE both to reduce the complexity of LCS computation from O(M × N) to O(mN + Mn − mn), where M and N are the lengths...
متن کاملFaster Parallel Computation of Edit Distances
Fast parallel algorithms are given for the longest common subsequence problem and the string editing problem with bounded weights. In the COMMON PRAM model, the algorithm for the longest common subse-quence problem takes time O(log m), where m is the length of the shorter string, while the algorithm for the string editing problem with bounded weights takes time O(max(log m; log n= log log n)), ...
متن کاملAn Optimal Algorithm for Finding the Longest Increasing Subsequence of Every Substring
Given a string S = {a1, a2, a3, · · · , an}, the longest increasing subsequence (LIS) problem is to find a subsequence of the given string such that the subsequence is increasing and its length is maximal. In a previous result, to find the longest increasing subsequences of each sliding windows with a fixed size w of a given string can be solved in O(w log log n + OUTPUT ) time, where O(w log l...
متن کاملConsequences of Faster Alignment of Sequences
The Local Alignment problem is a classical problem with applications in biology. Given two input strings and a scoring function on pairs of letters, one is asked to find the substrings of the two input strings that are most similar under the scoring function. The best algorithms for Local Alignment run in time that is roughly quadratic in the string length. It is a big open problem whether subs...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Complexity
دوره 24 شماره
صفحات -
تاریخ انتشار 2008